package com.xmy.cultivate.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xmy.cultivate.entity.Course;
import com.xmy.cultivate.entity.Grade;
import com.xmy.cultivate.entity.RenewData;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.entity.StudentGrade;
import com.xmy.cultivate.entity.views.ReNewDetailForTeacher;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author min
 * @since 2022-11-29
 */
public interface IRenewDataService extends IService<RenewData> {

    public abstract boolean addData(Long school_id, Long student_id,Integer yearPart, Course course, Grade grade);

    public abstract boolean updateData(Long school_id, Long student_id, Course course, Grade grade,Integer courseHouse,Integer reNewType,Long orderDetailId);

    public abstract boolean deleteData(Long schoolId, Long studentId,Long subjectsId,Integer yearPart,Integer quarterNum);

    public abstract boolean updateTeacher(Long schoolId, Long studentId,Course course, Grade grade);

    /**
     * 转校更新续班信息
     * @param studentId 学生id
     * @param outSchoolId 转出学校id
     * @param outYearPart 转出年份
     * @param inSchoolId 转入学校id
     * @param outCourseId 转出课程id
     * @param inCourseId 转入课程id
     * @param inGradeId 转入班级id
     * @param inCourseHosue 转入课程课时
     * @param orderDetailId 订单id
     * @return
     */
    public abstract boolean transferSchoolUpdate(Long studentId,Long outSchoolId,Integer outYearPart,Long inSchoolId,Long outCourseId,Long inCourseId, Long inGradeId,Integer inCourseHosue,Long orderDetailId);

    public abstract boolean deleteTeacherForGradeDelStudent(Grade grade, Long teacherId,Long studentId,Long subjectsId,Integer yearPart,Integer quarterNum);

    /**
     * 退费
     * @return
     */
    public abstract boolean refundUpdateData(Long school_id, Long student_id, Long courseId, Long gradeId,Long orderDetailId);


    public abstract IPage<ReNewDetailForTeacher> getRnewDetailForTeahcer(IPage<?> page, Wrapper wrapper);
}
